<template tag="以下文档内容为hycli自动生成">
  <div style="height: 100%">
    <div style="margin:0.8rem;"><h5 style="display:inline">需求管理</h5><span style="margin-left: 0.5rem; color:#999"> 需求处理情况跟踪管理</span>
        <ddmenu :menuList="lob_idList" @valueChanged="onlob_idChange" v-model="form_aaabt.lob_id" menuType="my_business_line" ></ddmenu>
    </div>
    <hr style="margin-top:0;color:#999"/>
<div class="query">
    
    <div class="tabs">
        <el-tabs v-model="form_aaabt.archive_status"  @tab-change="onQuery">
            <el-tab-pane v-for="item in archive_statusTabList" :name="item.value" :key="item.value" :label="item.name" 
             ></el-tab-pane>
          </el-tabs>
    </div>
    <el-form :model="form_aaabt" inline >
        <!-- 日期控件个数： 7 -->
        <el-form-item>
            <!--多日期范围控件 -->
            <el-select v-model="form_aaabt.single_date_range_name" filterable placeholder="日期类型" style="width:120px;" class="prepend">
                <el-option
                v-for="item in multiQueryDateRange"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
        </el-select>
            <el-date-picker :shortcuts="shortcuts" style="width: 200px" v-model="form_aaabt.single_date_range_value" type="daterange" start-placeholder="开始日期"
                end-placeholder="结束日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
        </el-form-item>
        <!--来源 下拉控件 -->
        <el-form-item>
            <el-select  v-model="form_aaabt.source" style="width: 100px" filterable clearable placeholder="来源">
                <el-option v-for="item in sourceList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!--研发计划 下拉控件多选 -->
        <el-form-item>
            <el-select v-model="form_aaabt.plan_id" filterable clearable multiple collapse-tags  style="width: 140px"
            collapse-tags-tooltip placeholder="研发计划">
                <el-option v-for="item in plan_idList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!--产品 下拉控件多选 -->
        <el-form-item>
            <el-select v-model="form_aaabt.pmaster" filterable clearable multiple collapse-tags  style="width: 140px"
            collapse-tags-tooltip placeholder="产品">
                <el-option v-for="item in pmasterList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!-- 控件个数：[{"index":6,"raw":"name","name":"name","cname":"Name","type":{"raw":"varchar2(128)","name":"varchar2","len":128,"dlen":0},"defValue":"","allowNull":false,"constraints":["c","l","u","le","q","DN","v","DN","lnm","li","rows(1)","lw(180)","#like","fx"],"desc":{"raw":"名称","name":"名称"}} {"index":11,"raw":"version","name":"version","cname":"Version","type":{"raw":"varchar2(32)","name":"varchar2","len":32,"dlen":0},"defValue":"","allowNull":true,"constraints":["q","le","v","sws","lw(60)","color","c2zp","fx","lidx(110)","w"],"desc":{"raw":"版本号","name":"版本号"}} {"index":12,"raw":"content","name":"content","cname":"Content","type":{"raw":"varchar2(2000)","name":"varchar2","len":2000,"dlen":0},"defValue":"","allowNull":false,"constraints":["q","c","le","u","v","li","rows(6)","#like","tp(rtext,c-u)","fx"],"desc":{"raw":"内容","name":"内容"}} {"index":25,"raw":"sponsor","name":"sponsor","cname":"Sponsor","type":{"raw":"varchar2(32)","name":"varchar2","len":32,"dlen":0},"defValue":"","allowNull":false,"constraints":["le","c","q","u","v","li","fx"],"desc":{"raw":"发起人","name":"发起人"}}] -->
         <el-form-item>
            <el-input clearable style="width: 180px" v-model="form_aaabt.single_text_value" maxlength="32"
                placeholder="关键字" >
                <template #prepend>
                    <el-select v-model="form_aaabt.single_text_name" placeholder="查询类型" style="width:84px;">
                        <el-option
                        v-for="item in multiQueryText"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                      </el-select>
                  </template>
            </el-input>
        </el-form-item>

        <span class="ddl">
        </span>
        <el-form-item>
            <el-space wrap>
                <el-button type="primary" icon="Search" @click="onQuery(true)">查询</el-button>
            </el-space>
        </el-form-item>
        
        <div class="blist">
            <el-button-group>
                <el-button :type="$js.page.tagColor(0)" v-if='
                form_aaabt.archive_status==2'
                
                 @click="show_cmpnt_aaaku">关联需求</el-button>
                <el-button :type="$js.page.tagColor(1)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                
                 icon="Plus"  @click="show_cmpnt_aaakf">提需求</el-button>
                <el-button :type="$js.page.tagColor(2)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="connection"  @click="show_cmpnt_aaakg">批量备注</el-button>
                <el-button :type="$js.page.tagColor(0)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==1'
                
                 icon="plus"  @click="show_cmpnt_aaakv">我要提需求</el-button>
                <el-button :type="$js.page.tagColor(1)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakh">待评估</el-button>
                <el-button :type="$js.page.tagColor(2)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaaki">设计中</el-button>
                <el-button :type="$js.page.tagColor(0)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakj">待内评</el-button>
                <el-button :type="$js.page.tagColor(1)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakk">待预评</el-button>
                <el-button :type="$js.page.tagColor(2)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakl">待正评</el-button>
                <el-button :type="$js.page.tagColor(0)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakm">待终版调整</el-button>
                <el-button :type="$js.page.tagColor(1)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakn">评审完成</el-button>
                <el-button :type="$js.page.tagColor(2)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaako">完成</el-button>
                <el-button :type="$js.page.tagColor(0)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakp">开发中</el-button>
                <el-button :type="$js.page.tagColor(1)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakq">延期</el-button>
                <el-button :type="$js.page.tagColor(2)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakr">关闭</el-button>
                <el-button :type="$js.page.tagColor(0)" v-if='
                form_aaabt.archive_status==1&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaaks">归档</el-button>
                <el-button :type="$js.page.tagColor(1)" v-if='
                form_aaabt.archive_status==0&&
                form_aaabt.tp==2'
                 :disabled="bcheck.length==0" 
                 icon="right"  @click="show_cmpnt_aaakt">激活</el-button>
            </el-button-group>
        </div>

        <!-- xtabs -->
        
        <div class="tabs">
            <el-tabs v-model="form_aaabt.prstatus"  @tab-change="onQuery">
                <el-tab-pane name="" label="全部"  ></el-tab-pane>
                <el-tab-pane v-for="item in prstatusList" :name="item.value" :key="item.value" :label="item.name" 
                 ></el-tab-pane>
              </el-tabs>
        </div>

    </el-form>
</div>
<div>
   <aaakd ref="cmpnt_aaakd" @onsaved="onQuery"></aaakd>
   <aaakc ref="cmpnt_aaakc" @onsaved="onQuery"></aaakc>
   <aaake ref="cmpnt_aaake" @onsaved="onQuery"></aaake>
   <aaaku ref="cmpnt_aaaku" @onsaved="onQuery"></aaaku>
   <aaakf ref="cmpnt_aaakf" @onsaved="onQuery"></aaakf>
   <aaakg ref="cmpnt_aaakg" @onsaved="onQuery"></aaakg>
   <aaakv ref="cmpnt_aaakv" @onsaved="onQuery"></aaakv>
   <aaakh ref="cmpnt_aaakh" @onsaved="onQuery"></aaakh>
   <aaaki ref="cmpnt_aaaki" @onsaved="onQuery"></aaaki>
   <aaakj ref="cmpnt_aaakj" @onsaved="onQuery"></aaakj>
   <aaakk ref="cmpnt_aaakk" @onsaved="onQuery"></aaakk>
   <aaakl ref="cmpnt_aaakl" @onsaved="onQuery"></aaakl>
   <aaakm ref="cmpnt_aaakm" @onsaved="onQuery"></aaakm>
   <aaakn ref="cmpnt_aaakn" @onsaved="onQuery"></aaakn>
   <aaako ref="cmpnt_aaako" @onsaved="onQuery"></aaako>
   <aaakp ref="cmpnt_aaakp" @onsaved="onQuery"></aaakp>
   <aaakq ref="cmpnt_aaakq" @onsaved="onQuery"></aaakq>
   <aaakr ref="cmpnt_aaakr" @onsaved="onQuery"></aaakr>
   <aaaks ref="cmpnt_aaaks" @onsaved="onQuery"></aaaks>
   <aaakt ref="cmpnt_aaakt" @onsaved="onQuery"></aaakt>
</div>
<div class="list">
    <el-table :data="dataList_aaabt"
    @selection-change="handleSelectionChange" 
    v-loading="conf.loading" stripe  style="width: 100%;height:calc(100vh - 160px)"
         empty-text="无数据">le
<el-table-column width="24px" type="expand">
    <template #default="view">
        <el-row :gutter="24">
            <el-col :span="5" class="text-right" style="min-height:26px">编号:</el-col>
            <el-col :span="7" v-text="view.row.le_prod_id" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">名称:</el-col>
            <el-col :span="7" v-html="view.row.le_name||'-'" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">研发计划:</el-col>
            <el-col :span="7" v-text="view.row.plan_id_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">优先级:</el-col>
            <el-col :span="7" v-text="view.row.priority_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.priority,'priority')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">分类:</el-col>
            <el-col :span="7" v-text="view.row.category_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.category,'category')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">来源:</el-col>
            <el-col :span="7" v-text="view.row.source_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.source,'source')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">版本号:</el-col>
            <el-col :span="7" v-text="view.row.le_version" style="min-height:26px" :class="$js.page.colorful(view.version,'version')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">内容:</el-col>
            <el-col :span="7" v-html="view.row.le_content||'-'" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">文档链接:</el-col>
            <el-col :span="7" style="min-height:26px"
            >
                <el-link target="_blank" type="primary" :href="view.row.le_url" v-if="view.row.le_url" :title="view.row.le_url">查看</el-link>
            </el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">创建时间:</el-col>
            <el-col :span="7" v-text="view.row.le_create_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">产品设计:</el-col>
            <el-col :span="7" v-text="view.row.need_prod_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.need_prod,'need_prod')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">产品:</el-col>
            <el-col :span="7" v-text="view.row.pmaster_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.pmaster,'pmaster')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">研发:</el-col>
            <el-col :span="7" v-text="view.row.dmaster_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">需求状态:</el-col>
            <el-col :span="7" v-text="view.row.prstatus_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.prstatus,'prstatus')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">提出时间:</el-col>
            <el-col :span="7" v-text="view.row.le_proposal_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">期望上线:</el-col>
            <el-col :span="7" v-text="view.row.le_expected_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">评估时间:</el-col>
            <el-col :span="7" v-text="view.row.le_req_ass_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">内评时间:</el-col>
            <el-col :span="7" v-text="view.row.le_internal_ass_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">正评时间:</el-col>
            <el-col :span="7" v-text="view.row.le_tch_sol_ass_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">创建人:</el-col>
            <el-col :span="7" v-text="view.row.creator_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">发起人:</el-col>
            <el-col :span="7" v-text="view.row.le_sponsor" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">备注:</el-col>
            <el-col :span="7" v-html="view.row.le_memo||'-'" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">归档状态:</el-col>
            <el-col :span="7" v-text="view.row.archive_status_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">业务线:</el-col>
            <el-col :span="7" v-text="view.row.lob_id_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">归档时间:</el-col>
            <el-col :span="7" v-text="view.row.le_archive_time" style="min-height:26px" ></el-col>
        </el-row>
    </template>
</el-table-column>
          <el-table-column type="selection" width="32" /> 
        	<!--prod_id text -->
        <el-table-column  show-overflow-tooltip    align="center" label="编号" >
            <template #default="scope">
                  <span>{{ scope.row.prod_id||'-' }}</span>
              </template>
        </el-table-column>
        	<!--name text -->
        <el-table-column  show-overflow-tooltip   min-width="180"   align="center" label="名称" >
            <template #default="scope">
                  <span>{{ scope.row.name||'-' }}</span>
              </template>
        </el-table-column>
        	<!--priority radio -->
        <el-table-column  :filters="priorityList" :filter-method="$js.page.columnfilter" column-key="priority"    min-width="80"   prop="priority" align="center" label="优先级">
            <template #default="scope">
                <span :class="$js.page.colorful(scope.row.priority,'priority')" 
                    v-text="scope.row.priority_label"></span>
            </template>
        </el-table-column>
        	<!--source radio -->
        <el-table-column    min-width="120"   prop="source" align="center" label="来源">
            <template #default="scope">
                <span :class="$js.page.colorful(scope.row.source,'source')" 
                    v-text="scope.row.source_label"></span>
            </template>
        </el-table-column>
        	<!--create_time daterange -->
        <el-table-column  show-overflow-tooltip    align="center" label="创建时间" >
            <template #default="scope">
                  <span>{{ scope.row.create_time||'-' }}</span>
              </template>
        </el-table-column>
        	<!--pmaster radio -->
        <el-table-column  :filters="pmasterList" :filter-method="$js.page.columnfilter" column-key="pmaster"    min-width="60"   prop="pmaster" align="center" label="产品">
            <template #default="scope">
                <span :class="$js.page.colorful(scope.row.pmaster,'pmaster')" 
                    v-text="scope.row.pmaster_label"></span>
            </template>
        </el-table-column>
        	<!--prstatus tag -->
        <el-table-column  :filters="prstatusList" :filter-method="$js.page.columnfilter" column-key="prstatus"    prop="prstatus" align="center" label="需求状态">
            <template #default="scope">
                <el-tag :type="$js.page.tagColor(scope.row.prstatus,'prstatus')" round v-text="scope.row.prstatus_label"  ></el-tag>
            </template>
        </el-table-column>
        	<!--category radio -->
        <el-table-column  :filters="categoryList" :filter-method="$js.page.columnfilter" column-key="category"     prop="category" align="center" label="分类">
            <template #default="scope">
                <span :class="$js.page.colorful(scope.row.category,'category')" 
                    v-text="scope.row.category_label"></span>
            </template>
        </el-table-column>
        	<!--expected_time date -->
        <el-table-column  show-overflow-tooltip    align="center" label="期望上线" >
            <template #default="scope">
                  <span>{{ scope.row.expected_time||'-' }}</span>
              </template>
        </el-table-column>

<el-table-column fixed="right" align="center" label="操作" width="168">
    <template #default="scope">
        <div class="opts">
            <el-button   type="text" @click="show_cmpnt_aaakd(scope.row)" >详情 </el-button>
            <el-button   type="text" @click="show_cmpnt_aaakc(scope.row)" >编辑 </el-button>
            <el-button   type="text" @click="show_cmpnt_aaake(scope.row)" >删除 </el-button>
        </div>
    </template>
</el-table-column>
    </el-table>
    <el-pagination :currentPage="form_aaabt.pi" :page-size="form_aaabt.ps"
        style="position: absolute; right: 30px;bottom:6px;" :page-sizes="[10,15,20,30, 50, 100]" :background="false" small
        layout="total,sizes,prev, pager, next, jumper" :total="total_aaabt" @size-change="handleSizeChange"
        @current-change="handleCurrentChange" />
</div>
  </div>
</template>
<script>
// 详情
import aaakd from "@/views/ws/prod/prod_requirement.view"
// 编辑
import aaakc from "@/views/ws/prod/prod_requirement.edit"
// 删除
import aaake from "@/views/ws/prod/prod_requirement.cnfrm"
// 关联需求
import aaaku from "@/views/ws/prod/prod_requirement.dialog"
// 提需求
import aaakf from "@/views/ws/prod/prod_requirement.add"
// 批量备注
import aaakg from "@/views/ws/prod/prod_requirement.dialog"
// 我要提需求
import aaakv from "@/views/ws/prod/prod_requirement.dialog"
// 待评估
import aaakh from "@/views/ws/prod/prod_requirement.dialog"
// 设计中
import aaaki from "@/views/ws/prod/prod_requirement.cnfrm"
// 待内评
import aaakj from "@/views/ws/prod/prod_requirement.cnfrm"
// 待预评
import aaakk from "@/views/ws/prod/prod_requirement.cnfrm"
// 待正评
import aaakl from "@/views/ws/prod/prod_requirement.dialog"
// 待终版调整
import aaakm from "@/views/ws/prod/prod_requirement.cnfrm"
// 评审完成
import aaakn from "@/views/ws/prod/prod_requirement.cnfrm"
// 完成
import aaako from "@/views/ws/prod/prod_requirement.cnfrm"
// 开发中
import aaakp from "@/views/ws/prod/prod_requirement.dialog"
// 延期
import aaakq from "@/views/ws/prod/prod_requirement.cnfrm"
// 关闭
import aaakr from "@/views/ws/prod/prod_requirement.cnfrm"
// 归档
import aaaks from "@/views/ws/prod/prod_requirement.cnfrm"
// 激活
import aaakt from "@/views/ws/prod/prod_requirement.cnfrm"
// 业务线
import ddmenu from "@/views/cmpnts/ddMenu.vue"



export default {
components: {
    aaakd,
    aaakc,
    aaake,
    aaaku,
    aaakf,
    aaakg,
    aaakv,
    aaakh,
    aaaki,
    aaakj,
    aaakk,
    aaakl,
    aaakm,
    aaakn,
    aaako,
    aaakp,
    aaakq,
    aaakr,
    aaaks,
    aaakt,
     ddmenu,
},
data() {
  return {
    shortcuts: this.$js.page.latestDays(),
    cmpnt_funcs:{},
    bcheck:[],
    conf: {
      loading: false,
      progressColor: this.$theia.env.conf.progress || []
    },
    ganttIdx: -1,
        form_aaabt: {
            pi: 1,
            ps: 15,
            disabled:false,
            single_date_range_name:"",
            single_date_range_value:[],
            single_text_name:"",
            single_text_value:"",
            name:"",
            plan_id:[],
            source:"",
            version:"",
            content:"",
            create_time:"",
            pmaster:[],
            prstatus:"",
            proposal_time:"",
            expected_time:"",
            req_ass_time:"",
            internal_ass_time:"",
            tch_sol_ass_time:"",
            sponsor:"",
            archive_status:"",
            lob_id:"",
            archive_time:"",
            },
            plan_idExts:[],
            plan_idList:[],
            priorityList:[],
            categoryList:[],
            sourceList:[],
            need_prodList:[],
            pmasterExts:[],
            pmasterList:[],
            dmasterList:[],
            prstatusList:[],
            creatorList:[],
            archive_statusList:[],
            archive_statusTabList:[],
            lob_idList:[],
            dataList_aaabt:[],
            multiQueryDateRange:[{label:"创建时间",value:"create_time"},{label:"提出时间",value:"proposal_time"},{label:"期望上线",value:"expected_time"},{label:"评估时间",value:"req_ass_time"},{label:"内评时间",value:"internal_ass_time"},{label:"正评时间",value:"tch_sol_ass_time"},{label:"归档时间",value:"archive_time"},],
            multiQueryText:[{label:"名称",value:"name"},{label:"版本号",value:"version"},{label:"内容",value:"content"},{label:"发起人",value:"sponsor"},],
            total_aaabt:0,
            note_dataList:[],
};
  },
mounted() {
  this.loadEnums_aaabt()
  this.form_aaabt.lob_id = this.$theia.user.get("lob_id")
  this.form_aaabt.single_date_range_name = (this.multiQueryDateRange[0]||{}).value
  this.form_aaabt.single_text_name = (this.multiQueryText[0]||{}).value
  this.cmpnt_funcs["aaakd"] = this.show_cmpnt_aaakd
  this.cmpnt_funcs["aaakc"] = this.show_cmpnt_aaakc
  this.cmpnt_funcs["aaake"] = this.show_cmpnt_aaake
  this.cmpnt_funcs["aaaku"] = this.show_cmpnt_aaaku
  this.cmpnt_funcs["aaakf"] = this.show_cmpnt_aaakf
  this.cmpnt_funcs["aaakg"] = this.show_cmpnt_aaakg
  this.cmpnt_funcs["aaakv"] = this.show_cmpnt_aaakv
  this.cmpnt_funcs["aaakh"] = this.show_cmpnt_aaakh
  this.cmpnt_funcs["aaaki"] = this.show_cmpnt_aaaki
  this.cmpnt_funcs["aaakj"] = this.show_cmpnt_aaakj
  this.cmpnt_funcs["aaakk"] = this.show_cmpnt_aaakk
  this.cmpnt_funcs["aaakl"] = this.show_cmpnt_aaakl
  this.cmpnt_funcs["aaakm"] = this.show_cmpnt_aaakm
  this.cmpnt_funcs["aaakn"] = this.show_cmpnt_aaakn
  this.cmpnt_funcs["aaako"] = this.show_cmpnt_aaako
  this.cmpnt_funcs["aaakp"] = this.show_cmpnt_aaakp
  this.cmpnt_funcs["aaakq"] = this.show_cmpnt_aaakq
  this.cmpnt_funcs["aaakr"] = this.show_cmpnt_aaakr
  this.cmpnt_funcs["aaaks"] = this.show_cmpnt_aaaks
  this.cmpnt_funcs["aaakt"] = this.show_cmpnt_aaakt

  this.form_aaabt = Object.assign(this.form_aaabt,this.$route.params)
    },
 watch: {
    '$route' () {
      this.form_aaabt = Object.assign(this.form_aaabt,this.$route.params)
      this.onQuery();//我的初始化方法
    }
  },
methods: {
  ganttChange(id) {
      this.ganttIdx = id
    },

queryData_aaabt(mform = {},nform={}){
    //构建查询参数
    let queryForm = Object.assign({},this.form_aaabt)
    queryForm = Object.assign(queryForm,nform||{})
    
    //处理多个日期选择
    queryForm[this.form_aaabt.single_date_range_name] = this.form_aaabt.single_date_range_value
    queryForm[this.form_aaabt.single_text_name] = this.form_aaabt.single_text_value
   
    //处理日期范围选择
      queryForm.plan_id = (queryForm.plan_id||[]).join(",")
      queryForm.start_create_time = null
      queryForm.end_create_time = null
    if(queryForm.create_time && queryForm.create_time.length > 1){
      queryForm.start_create_time = queryForm.create_time[0]
      queryForm.end_create_time = queryForm.create_time[1]
    }
      queryForm.pmaster = (queryForm.pmaster||[]).join(",")
      queryForm.start_proposal_time = null
      queryForm.end_proposal_time = null
    if(queryForm.proposal_time && queryForm.proposal_time.length > 1){
      queryForm.start_proposal_time = queryForm.proposal_time[0]
      queryForm.end_proposal_time = queryForm.proposal_time[1]
    }
      queryForm.start_expected_time = null
      queryForm.end_expected_time = null
    if(queryForm.expected_time && queryForm.expected_time.length > 1){
      queryForm.start_expected_time = queryForm.expected_time[0]
      queryForm.end_expected_time = queryForm.expected_time[1]
    }
      queryForm.start_req_ass_time = null
      queryForm.end_req_ass_time = null
    if(queryForm.req_ass_time && queryForm.req_ass_time.length > 1){
      queryForm.start_req_ass_time = queryForm.req_ass_time[0]
      queryForm.end_req_ass_time = queryForm.req_ass_time[1]
    }
      queryForm.start_internal_ass_time = null
      queryForm.end_internal_ass_time = null
    if(queryForm.internal_ass_time && queryForm.internal_ass_time.length > 1){
      queryForm.start_internal_ass_time = queryForm.internal_ass_time[0]
      queryForm.end_internal_ass_time = queryForm.internal_ass_time[1]
    }
      queryForm.start_tch_sol_ass_time = null
      queryForm.end_tch_sol_ass_time = null
    if(queryForm.tch_sol_ass_time && queryForm.tch_sol_ass_time.length > 1){
      queryForm.start_tch_sol_ass_time = queryForm.tch_sol_ass_time[0]
      queryForm.end_tch_sol_ass_time = queryForm.tch_sol_ass_time[1]
    }
      queryForm.start_archive_time = null
      queryForm.end_archive_time = null
    if(queryForm.archive_time && queryForm.archive_time.length > 1){
      queryForm.start_archive_time = queryForm.archive_time[0]
      queryForm.end_archive_time = queryForm.archive_time[1]
    }

    queryForm[this.form_aaabt.single_date_range_name] = null
    queryForm.single_date_range_value = null
    queryForm.single_date_range_name = null

    queryForm.single_text_value = null
    queryForm.single_text_name = null
 
    //处理关联表prod_requirement prod_requirement prod_requirement
   
    //发送查询请求
    let that = this
    that.conf.loading = true
    //构建统计查询
  //数据查询
  this.$theia.http.get("/ws/prod/requirement/query",queryForm).then(res=>{
      if((res.items||[]).length < (queryForm.ps||10)){
        that.form_aaabt.disabled = true
      }
      that.conf.loading = false
      that.dataList_aaabt = res.items||[]
      that.total_aaabt = res.count
      that.resetItemData_aaabt(that,that.dataList_aaabt)
    });
  },

  resetItemData_aaabt(that,lst){
    lst.forEach(item => {
      item.__raw = Object.assign({}, item)
    item.plan_id_label = that.$theia.enum.getName("dev_plan",item.plan_id)
    item.priority_label = that.$theia.enum.getName("PRI",item.priority)
    item.source_label = that.$theia.enum.getName("source",item.source)
    item.category_label = that.$theia.enum.getName("prod_req_cateogry",item.category)
    item.need_prod_label = that.$theia.enum.getName("bool",item.need_prod)
    item.pmaster_label = that.$theia.enum.getName("pmaster",item.pmaster)
    item.dmaster_label = that.$theia.enum.getName("dmaster",item.dmaster)
    item.prstatus_label = that.$theia.enum.getName("prstatus",item.prstatus)
    item.creator_label = that.$theia.enum.getName("user_account",item.creator)
    item.archive_status_label = that.$theia.enum.getName("archive_status",item.archive_status)
    item.lob_id_label = that.$theia.enum.getName("my_business_line",item.lob_id)
    item.prod_id_progress = item.prod_id
    item.name_progress = item.name
    item.plan_id_progress = item.plan_id
    item.priority_progress = item.priority
    item.source_progress = item.source
    item.content_progress = item.content
    item.category_progress = item.category
    item.version_progress = item.version
    item.url_progress = item.url
    item.create_time_progress = item.create_time
    item.need_prod_progress = item.need_prod
    item.pmaster_progress = item.pmaster
    item.dmaster_progress = item.dmaster
    item.prstatus_progress = item.prstatus
    item.proposal_time_progress = item.proposal_time
    item.expected_time_progress = item.expected_time
    item.req_ass_time_progress = item.req_ass_time
    item.internal_ass_time_progress = item.internal_ass_time
    item.tch_sol_ass_time_progress = item.tch_sol_ass_time
    item.creator_progress = item.creator
    item.sponsor_progress = item.sponsor
    item.memo_progress = item.memo
    item.archive_status_progress = item.archive_status
    item.lob_id_progress = item.lob_id
    item.archive_time_progress = item.archive_time
    item.le_prod_id = item.prod_id
    item.le_name = item.name
    item.le_plan_id = item.plan_id
    item.le_priority = item.priority
    item.le_category = item.category
    item.le_source = item.source
    item.le_version = item.version
    item.le_content = item.content
    item.le_url = item.url
    item.le_create_time = that.$theia.str.dateFormat(item.create_time,'MM/dd HH')
    item.le_need_prod = item.need_prod
    item.le_pmaster = item.pmaster
    item.le_dmaster = item.dmaster
    item.le_prstatus = item.prstatus
    item.le_proposal_time = that.$theia.str.dateFormat(item.proposal_time,'MM/dd')
    item.le_expected_time = that.$theia.str.dateFormat(item.expected_time,'MM/dd')
    item.le_req_ass_time = that.$theia.str.dateFormat(item.req_ass_time,'MM/dd')
    item.le_internal_ass_time = that.$theia.str.dateFormat(item.internal_ass_time,'MM/dd')
    item.le_tch_sol_ass_time = that.$theia.str.dateFormat(item.tch_sol_ass_time,'MM/dd')
    item.le_creator = item.creator
    item.le_sponsor = item.sponsor
    item.le_memo = item.memo
    item.le_archive_status = item.archive_status
    item.le_lob_id = item.lob_id
    item.le_archive_time = item.archive_time
    item.create_time = that.$theia.str.dateFormat(item.create_time,'MM/dd HH')
    item.expected_time = that.$theia.str.dateFormat(item.expected_time,'MM/dd')
    if(item.children){
      that.resetItemData_aaabt(that,item.children)
    }
  });
  },
    handleSelectionChange(lst=[]){
      this.bcheck = []
      lst.forEach(f=>{
        this.bcheck.push(f.prod_id)
      })
    },
    loadEnums_aaabt(){
        //研发计划
        this.plan_idList = this.$theia.enum.get("dev_plan","",this.$theia.user.get("lob_id"),false,"")
        //来源
        this.sourceList = this.$theia.enum.get("source","","" ,false,"")
        //产品
        this.pmasterList = this.$theia.enum.get("pmaster","",this.$theia.user.get("lob_id"),false,"")
        //需求状态
        this.prstatusList = this.$theia.enum.get("prstatus","","" ,false,"")
        //归档状态
        this.archive_statusTabList = this.$theia.enum.get("archive_status","","",false,"")
        //业务线
        this.lob_idList = this.$theia.enum.getTree("my_business_line","","" ,99)
        //优先级
        this.priorityList = this.$theia.enum.get("PRI","","" ,false,"")
        //来源
        this.sourceList = this.$theia.enum.get("source","","" ,false,"")
        //产品
        this.pmasterList = this.$theia.enum.get("pmaster","",this.$theia.user.get("lob_id"),false,"")
        //需求状态
        this.prstatusList = this.$theia.enum.get("prstatus","","" ,false,"")
        //分类
        this.categoryList = this.$theia.enum.get("prod_req_cateogry","","" ,false,"")
    },

  handleSizeChange(ps){
    this.form_aaabt.ps = ps
    this.onQuery(true)
  },
  onlob_idChange(v){
    this.$theia.user.set("lob_id",v)
    this.loadEnums_aaabt()
    this.onQuery(true)
  },
  handleCurrentChange(pi){
    this.form_aaabt.pi = pi
    this.onQuery()
  },
  onQuery(refresh){
    if(refresh){
      this.form_aaabt.pi = 1
    }
    this.queryData_aaabt ()
  },
show_cmpnt(cmd,row){
  if(this.cmpnt_funcs[cmd]){
    this.cmpnt_funcs[cmd](row)
  }
},
  //详情
  show_cmpnt_aaakd(fm = {}){
    let query = {} 
    query.prod_id = fm.prod_id|| fm.le_prod_id 
    query.name = fm.name|| fm.le_name 
    query.plan_id = fm.plan_id|| fm.le_plan_id 
    query.priority = fm.priority|| fm.le_priority 
    query.category = fm.category|| fm.le_category 
    query.source = fm.source|| fm.le_source 
    query.version = fm.version|| fm.le_version 
    query.content = fm.content|| fm.le_content 
    query.url = fm.url|| fm.le_url 
    query.create_time = fm.create_time|| fm.le_create_time 
    query.need_prod = fm.need_prod|| fm.le_need_prod 
    query.pmaster = fm.pmaster|| fm.le_pmaster 
    query.dmaster = fm.dmaster|| fm.le_dmaster 
    query.prstatus = fm.prstatus|| fm.le_prstatus 
    query.proposal_time = fm.proposal_time|| fm.le_proposal_time 
    query.expected_time = fm.expected_time|| fm.le_expected_time 
    query.req_ass_time = fm.req_ass_time|| fm.le_req_ass_time 
    query.internal_ass_time = fm.internal_ass_time|| fm.le_internal_ass_time 
    query.tch_sol_ass_time = fm.tch_sol_ass_time|| fm.le_tch_sol_ass_time 
    query.creator = fm.creator|| fm.le_creator 
    query.sponsor = fm.sponsor|| fm.le_sponsor 
    query.memo = fm.memo|| fm.le_memo 
    query.archive_status = fm.archive_status|| fm.le_archive_status 
    query.lob_id = fm.lob_id|| fm.le_lob_id 
    query.archive_time = fm.archive_time|| fm.le_archive_time 
    query.prod_id = fm.prod_id

      //2023.4.18添加---

    query.$title="详情"
    this.$refs.cmpnt_aaakd.show(query)
  },
  //编辑
  show_cmpnt_aaakc(fm = {}){
    let query = {} 
    query.name = fm.name|| fm.le_name 
    query.priority = fm.priority|| fm.le_priority 
    query.category = fm.category|| fm.le_category 
    query.source = fm.source|| fm.le_source 
    query.content = fm.content|| fm.le_content 
    query.url = fm.url|| fm.le_url 
    query.pmaster = fm.pmaster|| fm.le_pmaster 
    query.dmaster = fm.dmaster|| fm.le_dmaster 
    query.prstatus = fm.prstatus|| fm.le_prstatus 
    query.proposal_time = fm.proposal_time|| fm.le_proposal_time 
    query.expected_time = fm.expected_time|| fm.le_expected_time 
    query.req_ass_time = fm.req_ass_time|| fm.le_req_ass_time 
    query.internal_ass_time = fm.internal_ass_time|| fm.le_internal_ass_time 
    query.tch_sol_ass_time = fm.tch_sol_ass_time|| fm.le_tch_sol_ass_time 
    query.sponsor = fm.sponsor|| fm.le_sponsor 
    query.memo = fm.memo|| fm.le_memo 
    query.prod_id = fm.prod_id

      //2023.4.18添加---

    query.$title="编辑"
    this.$refs.cmpnt_aaakc.show(query)
  },
  //删除
  show_cmpnt_aaake(fm = {}){
    let query = {} 
    query.prod_id = fm.prod_id|| fm.le_prod_id 
    query.prod_id = fm.prod_id

      //2023.4.18添加---

    query.$title="删除"
    this.$refs.cmpnt_aaake.show_aaake(query)
  },
  //关联需求
  show_cmpnt_aaaku(fm = {}){
    let query = {}
    query.mx = fm.rpp|| fm.le_rpp 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prstatus = "88"

    query.$title="关联需求"
    this.$refs.cmpnt_aaaku.show_aaaku(query)
  },
  //提需求
  show_cmpnt_aaakf(fm = {}){
    let query = {} 
    query.name = fm.name|| fm.le_name 
    query.priority = fm.priority|| fm.le_priority 
    query.category = fm.category|| fm.le_category 
    query.source = fm.source|| fm.le_source 
    query.content = fm.content|| fm.le_content 
    query.url = fm.url|| fm.le_url 
    query.pmaster = fm.pmaster|| fm.le_pmaster 
    query.prstatus = fm.prstatus|| fm.le_prstatus 
    query.proposal_time = fm.proposal_time|| fm.le_proposal_time 
    query.expected_time = fm.expected_time|| fm.le_expected_time 
    query.req_ass_time = fm.req_ass_time|| fm.le_req_ass_time 
    query.internal_ass_time = fm.internal_ass_time|| fm.le_internal_ass_time 
    query.tch_sol_ass_time = fm.tch_sol_ass_time|| fm.le_tch_sol_ass_time 
    query.sponsor = fm.sponsor|| fm.le_sponsor 
    query.memo = fm.memo|| fm.le_memo 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.need_prod = "0"

    query.$title="提需求"
    this.$refs.cmpnt_aaakf.show(query)
  },
  //批量备注
  show_cmpnt_aaakg(fm = {}){
    let query = {}
    query.m = fm.bm|| fm.le_bm 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")

    query.$title="批量备注"
    this.$refs.cmpnt_aaakg.show_aaakg(query)
  },
  //我要提需求
  show_cmpnt_aaakv(fm = {}){
    let query = {}
    query.li = fm.li|| fm.le_li 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.priority = "3"

    query.$title="我要提需求"
    this.$refs.cmpnt_aaakv.show_aaakv(query)
  },
  //待评估
  show_cmpnt_aaakh(fm = {}){
    let query = {}
    query.m = fm.cpr|| fm.le_cpr 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "20"

    query.$title="待评估"
    this.$refs.cmpnt_aaakh.show_aaakh(query)
  },
  //设计中
  show_cmpnt_aaaki(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "30"

    query.$title="设计中"
    this.$refs.cmpnt_aaaki.show_aaaki(query)
  },
  //待内评
  show_cmpnt_aaakj(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "40"

    query.$title="待内评"
    this.$refs.cmpnt_aaakj.show_aaakj(query)
  },
  //待预评
  show_cmpnt_aaakk(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "50"

    query.$title="待预评"
    this.$refs.cmpnt_aaakk.show_aaakk(query)
  },
  //待正评
  show_cmpnt_aaakl(fm = {}){
    let query = {}
    query.m = fm.c2zp|| fm.le_c2zp 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "60"

    query.$title="待正评"
    this.$refs.cmpnt_aaakl.show_aaakl(query)
  },
  //待终版调整
  show_cmpnt_aaakm(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "80"

    query.$title="待终版调整"
    this.$refs.cmpnt_aaakm.show_aaakm(query)
  },
  //评审完成
  show_cmpnt_aaakn(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "89"

    query.$title="评审完成"
    this.$refs.cmpnt_aaakn.show_aaakn(query)
  },
  //完成
  show_cmpnt_aaako(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "0"

    query.$title="完成"
    this.$refs.cmpnt_aaako.show_aaako(query)
  },
  //开发中
  show_cmpnt_aaakp(fm = {}){
    let query = {}
    query.m = fm.w|| fm.le_w 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "88"

    query.$title="开发中"
    this.$refs.cmpnt_aaakp.show_aaakp(query)
  },
  //延期
  show_cmpnt_aaakq(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "99"

    query.$title="延期"
    this.$refs.cmpnt_aaakq.show_aaakq(query)
  },
  //关闭
  show_cmpnt_aaakr(fm = {}){
    let query = {}
    query.m = fm.prs|| fm.le_prs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.prod_id = (this.bcheck||[]).join(",")
    query.prstatus = "98"

    query.$title="关闭"
    this.$refs.cmpnt_aaakr.show_aaakr(query)
  },
  //归档
  show_cmpnt_aaaks(fm = {}){
    let query = {}
    query.m = fm.cprs|| fm.le_cprs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.archive_status = "0"
    query.prod_id = (this.bcheck||[]).join(",")

    query.$title="归档"
    this.$refs.cmpnt_aaaks.show_aaaks(query)
  },
  //激活
  show_cmpnt_aaakt(fm = {}){
    let query = {}
    query.m = fm.cprs|| fm.le_cprs 
    query.prod_id = fm.prod_id

      //2023.4.18添加---
    query.archive_status = "1"
    query.prod_id = (this.bcheck||[]).join(",")

    query.$title="激活"
    this.$refs.cmpnt_aaakt.show_aaakt(query)
  },
},
};
</script>
<style>
.el-dialog{
  border-radius:5px !important
}
</style>
<style scoped>
.el-form-item {
  margin-right: 10px !important;
}

.opts .el-button--small {
  margin-left: 0px;
  padding-left: 0px;
  margin-right: 4px;
}

/deep/.el-table td.el-table__cell div {
  vertical-align: middle;
}
/deep/.el-button+.el-dropdown{
  margin-left:0px;
}
/deep/.el-button+.el-button{
  margin-left:0px;
}
.el-button{
  padding-left: 6px !important;
  padding-right: 6px !important;
}
.blist {
  margin-bottom: 8px;
  width: 100%;
}

.blist .el-radio-group {
  margin-right: 8px;
}

.ddl {
  margin-bottom: 8px;
  width: 100%;

}

.ddl .el-dropdown {
  margin-right: 8px;
}

.listbar {
  margin-bottom: 8px;
  text-align: center;
}
 .el-dropdown-link {
  cursor: pointer;
  color: var(--el-color-primary);
  display: flex;
  align-items: center;
  font-size: 0.65rem;
}
/deep/.el-button--small{
  padding: 5px 4px;
}

.prepend /deep/.el-input__wrapper{
  border-top-right-radius:0;
  border-bottom-right-radius:0;
}
.prepend+/deep/.el-date-editor{
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  border-left:0;
}

</style>